<template>
  <div>
    <el-pagination
      background
      layout="prev,pager,next"
      :total="60"
      @current-change="ok"
      @prev-click="ol"
      @next-click="op"
    ></el-pagination>
  </div>
<!-- @click.native="$router.push('/daohang/1')" -->
</template>

<script>
import moment from "moment";
export default {
  props: ["id"],
  data() {
    return {
      moment:moment,
      val:this.$route.query.val,
    };
  },
  methods: {
    ol(val) {
      this.$router.push(`/daohang/wd/${parseInt(this.$route.params.id)-1}`)
      console.log(parseInt($route.params.id)-1)
    },
    op(val) {
      this.$router.push(`/daohang/wd/${parseInt(this.$route.params.id)+1}`)
    },
    ok(val){
      console.log(val)
      this.$router.push(`/daohang/wd/${val}`)
    }
  }
};
</script>

<style lang="scss" scoped>
</style>